class Solution(object):
    def asteroidsDestroyed(self, mass, asteroids):
        asteroids.sort()
        for num in asteroids:
            if mass < num:
                return False
            else:
                mass += num
        return True